When photographing a subject with an imaging device such as a camera, the device retrieves scene information including the background around the subject and outputs an image corresponding to the scene information. In this regard, the output image can have different expressions depending on how the focus is adjusted with respect to the subject and the background.
If it is desired to obtain an output image in which the subject is emphasized, a method to achieve this is to make the depth of field shallower so that the subject, i.e. a near view, is in focus while the background, i.e. a distant view, is out of focus. Achieving a shallow depth of field requires some sort of means such as close-up shooting, a telephoto lens or a wider aperture. However, it is difficult for ordinary people to use such means or to get hardware being capable of such means. Further, due to very restrictive hardware limitations, most camera-equipped mobile phones such as smartphones output deep-focus images that have such a large depth of field that an entire image looks in focus from the near view to the distant view. Accordingly, it is difficult to obtain an image with shallow depth of field with the hardware of such widely used devices.
In order for even cameras by which it difficult to achieve a shallow depth of field to output images in which a desired subject is emphasized, a technique as proposed in Patent Document 1 and the like is to obtain an image with blur around the contour of a subject (the so-called soft focus image) in response to a photographing operation, automatically photographing sequential images that include an in-focus image in which a subject is in focus and an out-of-focus image in which the subject is out of focus, and then compositing the in-focus image and the out-of-focus image.